package Sort.面试.华为;

import asTest.AA.B;
import freemarker.core.JSONOutputFormat;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;

public class test {
    public static String formatString (String str, char[] arg) {
        // write code here
        int index = 0;
        int length = arg.length;
        while(str.indexOf("%s") != -1){
            String temp = arg[index] + "";
            str = str.replaceFirst("%s", temp);
            index ++;
        }

        for(int i = index; i < length; i++){
            str += arg[i];
        }

        return str;
    }

    public static void main(String[] args) {
        char[] ch = {'B','D','F'};
        System.out.println(formatString("A%sC%sE",ch));

        BigDecimal a = new BigDecimal(0);

    }
}
